package com.java.awt;

import java.awt.*;

public class FlowLayoutClient {

	private Frame frame ;
	private Button b1,b2 ,b3;

	public void go(){
		frame = new Frame("Flow Layout");
		frame.setLayout(new FlowLayout());//使用FlowLayout替换掉默认的BorderLayout布局管理器
		b1 = new Button("hello");
		b2 = new Button("world");
		b3 = new Button("welcome");
		frame.add(b1);//将b1添加到对象frame中
		frame.add(b2);//将b2添加到对象frame中
		frame.add(b3);//将b3添加到对象frame中
		frame.setSize(200,200);//设置窗体大小
		frame.setVisible(true);//设置窗体可见
	}

	public static void main(String[] args) {
		FlowLayoutClient flow = new FlowLayoutClient();
		flow.go();
	}
}
